projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b16ec9
)
Use g_slice_dup
author
Matthias Clasen
<mclasen@redhat.com>
Sun, 8 Jan 2012 00:00:47 +0000
(19:00 -0500)
committer
Matthias Clasen
<mclasen@redhat.com>
Sun, 8 Jan 2012 00:00:47 +0000
(19:00 -0500)
This saves some manual copying.
Pointed out in bug 667473.
gdk/gdkrgba.c
patch
|
blob
|
history
diff --git
a/gdk/gdkrgba.c
b/gdk/gdkrgba.c
index f5e20c5f3aeb7d46b860c7d1d666de6054c382ee..a9008503953eadc76ead7c510b71fb2db4f166a7 100644
(file)
--- a/
gdk/gdkrgba.c
+++ b/
gdk/gdkrgba.c
@@
-71,15
+71,7
@@
G_DEFINE_BOXED_TYPE (GdkRGBA, gdk_rgba,
GdkRGBA *
gdk_rgba_copy (const GdkRGBA *rgba)
{
- GdkRGBA *copy;
-
- copy = g_slice_new (GdkRGBA);
- copy->red = rgba->red;
- copy->green = rgba->green;
- copy->blue = rgba->blue;
- copy->alpha = rgba->alpha;
-
- return copy;
+ return g_slice_dup (GdkRGBA, rgba);
}
/**